package chain_of_responsibility_pattern.exercise.exercise1;

/**
 * 抽象过滤器
 * @author ricejson
 */
public abstract class Filter {

    protected Filter successor;

    public void setSuccessor(Filter successor) {
        this.successor = successor;
    }

    /**
     * 过滤方法
     * @param text 待处理文本
     * @return 处理结果文本
     */
    public abstract String filter(String text);
}
